home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / examples / exam02 / main.c < prev    next >
C/C++ Source or Header  |  1995-09-27  |  1KB  |  92 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. /*
  7.  *
  8.  *    This source code is CONFIDENTIAL and
  9.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  10.  *    distribution, adaptation or use    may
  11.  *    be subject to civil and    criminal penalties.
  12.  *
  13.  *    Copyright (c) 1993 Algorithms Corporation
  14.  *    3020 Liberty Hills Drive
  15.  *    Franklin, TN  37064
  16.  *
  17.  *    ALL RIGHTS RESERVED.
  18.  *
  19.  *
  20.  *
  21.  */
  22.  
  23.  
  24.  
  25. #include "generics.h"
  26.  
  27.  
  28. main(int argc, char *argv[])
  29. {
  30.     /*  Declare a Dynace object  */
  31.  
  32.     object    myObj;
  33.  
  34.  
  35.     InitDynace(&argc);
  36.  
  37.  
  38.     /*  Create a new instance of class ShortInteger initialized to 6 */
  39.  
  40.     myObj = gNewWithInt(ShortInteger, 6);
  41.  
  42.  
  43.     /*  Tell the object to print itself on stdout  */
  44.  
  45.     gPrint(myObj, stdoutStream);
  46.  
  47.  
  48.     /*  Change the value contained in the object  */
  49.  
  50.     gChangeShortValue(myObj, 77);
  51.  
  52.  
  53.     /*  Tell the object to print itself again  */
  54.  
  55.     gPrint(myObj, stdoutStream);
  56.  
  57.  
  58.     /*  When an object is no longer needed it should be disposed of,
  59.         returning its memory to the heap.  (This would be done
  60.         automatically if the garbage collector was enabled.)  */
  61.  
  62.     gDispose(myObj);
  63.  
  64.     
  65.     return 0;
  66. }
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. /*
  75.  *
  76.  *    This source code is CONFIDENTIAL and
  77.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  78.  *    distribution, adaptation or use    may
  79.  *    be subject to civil and    criminal penalties.
  80.  *
  81.  *    Copyright (c) 1993 Algorithms Corporation
  82.  *    3020 Liberty Hills Drive
  83.  *    Franklin, TN  37064
  84.  *
  85.  *    ALL RIGHTS RESERVED.
  86.  *
  87.  *
  88.  *
  89.  */
  90.  
  91.  
  92.